<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<script type="text/javascript" src="../com.attilax/core/approot_js.jsp"></script>

<script type="text/javascript" src="../com.atilax.frmwk/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="cfg.js"></script>
<script type="text/javascript" src="js/js_ui.js"></script>
<script type="text/javascript" src="../com.attilax/core/approot_js.jsp"></script>
<script type="text/javascript" src="../com.attilax/core/core.js"></script>
<script type="text/javascript" src="../com.attilax/time/time.js"></script>
 <script type="text/javascript" src="../com.attilax/templete/jquery.tmpl.js"></script>
 
  <script type="text/javascript" src="../com.attilax/core/core.js"></script>
    <script type="text/javascript" src="../com.attilax/hre/hre.js"></script>
    <script type="text/javascript" src="cfg.js"></script>
<style type="text/css">
.selected {
	font-size: 18px;
	font-weight: bolder;
	color: #F30;
	background-color: #CC3;
}
</style>
<link rel="stylesheet" type="text/css" href="../com.atilax.frmwk/bootstrap/css/bootstrap.css"/>
    <script src="list.js"></script>
  <script src="0list.test.js"></script>
      <script type="text/javascript" src="../com.attilax/net/req.js"></script>
      <script type="text/javascript" src="../com.attilax/sql/filterParser.js"></script>

</head>

<body>
<textarea name="textarea" id="textarea" cols="450" rows="5" style="width:500px;" onchange="change_event();"  data-options="required:true,validType:addrCheckor"  class="easyui-validatebox">chensen,13652566665,guangdaongsen guangzhousi leiwanqyiu,516333
chensen,13652566665,guangdaongsen guangzhousi leiwanqyiu,516333
chensen,13652566665,guangdaongsen guangzhousi leiwanqyiu,516333
chensen,13652566665,guangdaongsen guangzhousi leiwanqyiu,516333
  
  </textarea>
<input type="button" name="button" id="button" value="校验"  onclick="valid_btn_click();"/>
<script src="AtiValid.js"></script>
<script>


function addrCheckor(data)
{
	var t=$("#textarea").val();
	var a=t.split("\n");
	var line_nums_err="";
	 
	for(var j=0;j<a.length;j++)
	{
		var line=$.trim(a[j]);
		if(line.length==0)
		{			 
			continue;		
		}
		if(!valide_line(line))
			line_nums_err=line_nums_err+","+(j+1);
		
	}
	if(line_nums_err.length>0)
	alert("以下行格式错误，行号为:"+line_nums_err);
	else
	alert("ok");
	
}
function valide_line(line)

{
	var a=line.split(",");
	if(a.length!=4)
	return false;
	else
	return true;
	
}
function valid_btn_click()
{
	atiValid();
	
}

</script>
</body>
</html>
